package com.atguigu.Example.Controller;

import com.atguigu.Example.Pojo.Student;
import com.atguigu.Example.Sevice.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package com.Example.Controller
 * @date 2024/4/22 下午2:52
 */
@Component
public class StudentController {
    @Autowired
    private StudentService studentService;

    public void findAll() {
        List<Student> students = studentService.findAll();
        for (Student student : students) {
            System.out.println(student);
        }
    }
}
